/*
 * @Author: wangke
 * @Date: 2025-03-13 00:03:18
 * @LastEditors: wangke
 * @LastEditTime: 2025-03-15 16:52:33
 * 
 */

#ifndef SONIX_H
#define SONIX_H

#include "stdint.h"
#include "stdbool.h"
#include "stdio.h"
#include "BspOid.h"

#define FUNC_OID_STARTUP_FORMT BSP_OID_OLD64BIT /**< Oid start up format */
#define FUNC_OID_EN_DEBOUNCE 1 /**< Oid enable/disable index debounce function. 0: disable; 1: enable */
#define FUNC_OID_ONLY_TYPE_EN 0 /**< Enable/disable only oid type function. 0: disable; 1: enable */
#define FUNC_OID_ONLY_TYPE ( 0x0020 ) /**< Oid only type: 0x0000 only oid2/3, 0x0010 only oid3s, 0x0020 only oid4 */

/* Exported constants --------------------------------------------------------*/
    
#if FUNC_OID_EN_DEBOUNCE
    #define FUNC_OID_DEB_INDEX_CNT ( 2 ) /**< How many same index needed for oid debounce */
    #define FUNC_OID_DEB_INVALID_CNT ( 8 ) /**< How many invalid index needed for detect oid up */
    #define FUNC_OID_DEB_TIMER_CNT ( 10 ) /**< How many idle timer count needed for detect oid up, *10ms */
#endif
int32_t Func_Oid_Init( void );
//int32_t Func_Oid_Init( void );
uint8_t Sonix_ReceiveGeneralIndex();
#endif